#pragma once

#include "base/core/singleton.h"
#include "base/core/object_pool.h"
#include "Common/Timer/TimerAxis.h"
#include "ProtoBuffer/AllProtocol.h"
#include "Common/MessageDispatch/MessageDispatch.h"
#include "Common/Event/Event.h"
#include "Common/EventDefine.h"

//中心服事件广播通知管理管理
class CNotifyMgr : public IEventExecuteSink, public ManualSingleton<CNotifyMgr>
{
	friend class ManualSingleton<CNotifyMgr>;
public:
	CNotifyMgr();
	virtual ~CNotifyMgr();
	bool Init();
	void UnInit();
	/////////////////////////////////  IEventExecuteSink  /////////////////////////////////////////
	virtual void OnExecute(uint16_t nEventID, uint64_t nSrcID, uint8_t bySrcType, void *pContext, int32_t nLen);

	//竞技场排名改变
	void OnArenaRankChange(CharIDType srcCid, int32_t rank);
	//工会大厅等级改变
	void OnUnionHallLev(string strUnionName, int32_t level);
};

#define g_MakeCNotifyMgr() (CNotifyMgr::Instance())
#define g_GetCNotifyMgr()  (CNotifyMgr::GetInstance())
#define g_DelCNotifyMgr()  (CNotifyMgr::Destroy())